package Review2;

public class Test09 {
   public int fibonacci(int n){
	   if(n==0){
		   return 0;
	   }
	   if(n==1){
		   return 1;
	   }
	   int fibonaccione = 0;
	   int fibonaccitwo = 1;
	   int fibonacciN=0;
	   for(int i=1;i<n;i++){
		   fibonacciN = fibonaccione+fibonaccitwo;
		   fibonaccione = fibonaccitwo;
		   fibonaccitwo = fibonacciN;
	   }
	   return fibonacciN;
		   
	   
	   
   }
}
